package part17;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;

/**
 * @author wcj
 * @Date 2021/6/1 17:43
 * @Version 1.0
 */
public class Part175 {

    /**
     * Collection的功能方法，这里不一一介绍
     *
     * @param args
     */
    public static void main(String[] args) {
        Collection<String> c = new ArrayList<>();
        c.add("wcj");
        c.addAll(Arrays.asList("bss", "hhy"));
        System.out.println(c);
        Object[] objects = c.toArray();
        System.out.println(Arrays.toString(objects));

        System.out.println("max:" + Collections.max(c));
        System.out.println("min:" + Collections.min(c));
        c.clear();
        System.out.println(c);

        c.add("ysj");
        if (c.contains("ysj")) {
            System.out.println("ok!fine");
        }

    }
}
